package com.boarsoft.boar.batch.demo.flow.bigfile;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.boarsoft.boar.batch.demo.biz.Coredpfm01Biz;
import com.boarsoft.boar.batch.demo.entity.Coredpfm01;
import com.boarsoft.flow.core.bean.ProcessHandler;
import com.boarsoft.hibernate.biz.SimpleBizImpl;

/**
 * @ClassName: QryDpfm01   
 * @Description:  通过tenantId分库查询Coredpfm01的类
 */
public class QryDpfm01 extends SimpleBizImpl implements ProcessHandler {
	private static final Logger log = LoggerFactory.getLogger(QryDpfm01.class);

	@Autowired
	protected Coredpfm01Biz biz;

	@Override
	public Object process(String entry, Object data, Throwable e) throws InterruptedException {
		Map<String, Object> pm = (Map<String, Object>) data;
		final String hql = (String) pm.get("select");
		final int tenantId = (int) pm.get("tenantId");
		int pageNo = 1;
		int pageSize = 10;
		List<Coredpfm01> lst = (List<Coredpfm01>) biz.list(tenantId, hql, pageNo, pageSize);
		System.out.println("查询dpfm01的分库tenantId：" + tenantId);
//		log.info("list：" + lst);
		return lst;

	}

}
